package de.karlNet.sambamanager.view.beans.forms;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ViewBeanBucket {
	@Autowired
	List<IViewBean> otherBeans;
	
	public String getUpdateString() {
		List<String> preparedPageNames = new ArrayList<String>();
		for (IViewBean viewBean : this.otherBeans) {
			preparedPageNames.add(":" + viewBean.getPageName());
		}
		return StringUtils.join(preparedPageNames, ",");
	}
}
